﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DungeonGenerator
{
    class Program
    {
        public const int SCREENX = 70;
        public const int SCREENY = 40;
        public const int SCREENMIN = 1;
        static bool gameRunning = true;

        static void gameInit()
        {
            Console.Clear();
            Console.SetWindowSize(SCREENX+1, SCREENY+1);
            Console.SetBufferSize(SCREENX+1, SCREENY+1);
            Console.Title = "DunGen";

            Random rand = new Random((int)System.DateTime.Now.Ticks);

            Map.generateMap(rand.Next(3,5));
            Map.drawMap();
        }

        static void gameLoop()
        {
            ConsoleKey inputTemp = new ConsoleKey();

            while (gameRunning == true)
            {
                inputTemp = Console.ReadKey().Key;
                switch (inputTemp)
                {
                    case ConsoleKey.Q:
                        gameRunning = false;
                        break;

                    case ConsoleKey.R:
                        gameInit();
                        break;
                }

            }
        }

        static void Main(string[] args)
        {
            gameInit();

            gameLoop();

            gameQuit();
        }

        static void gameQuit()
        {
            
        }
    }
}
